import java.util.ArrayList;

public class Main
{
	public static void main(String[] args)
	{
		// CheckersState state = new CheckersState();
		// System.out.println("Initial State");
		// state.printState();
		// CheckersState t = null;
		// for (Move m : state.actions())
		// {
		// System.out.println(m);
		// t = state.result(m);
		// t.printState();
		// }
		
		
		// t.printState();
		//
		// for (Move m : t.actions())
		// {
		// t2 = t.result(m);
		// t2.printState();
		// }
		// for (Move m : t2.actions())
		// {
		// t2.result(m).printState();
		// }
		
		// MAIN TEST
//		CheckersState inputTest = new CheckersState("-b-b-b-bb-b-b-b------b-bb-b------w--------w-w-w--w-w-w-ww-w-w-w-", "white");
//		System.out.println("Initial State");
//		inputTest.printState();
//		CheckersState t = null;
//		System.out.println(inputTest.actions());
//		for (Move m : inputTest.actions())
//		{
//			System.out.println(m);
//			t = inputTest.result(m);
//			t.printState();
//		}
		
		
		// CheckersState state1 = new CheckersState();
		// CheckersState state2 = null;
		// CheckersState state3 = null;
		// CheckersState state4 = null;
		// CheckersState state5 = null;
		// CheckersState state6 = null;
		// CheckersState state7 = null;
		// CheckersState state8 = null;
		// CheckersState state9 = null;
		// CheckersState state10 = null;
		//
		// System.out.println("Initial State");
		// state1.printState();
		// System.out.println(state1.actions());
		// state2 = state1.result(state1.actions().get(0));
		// state2.printState();
		// System.out.println(state2.actions());
		// state3 = state2.result(state2.actions().get(0));
		// state3.printState();
		// System.out.println(state3.actions());
		// state4 = state3.result(state3.actions().get(0));
		// state4.printState();
		// System.out.println(state4.actions());
		// state5 = state4.result(state4.actions().get(0));
		// state5.printState();
		// System.out.println(state5.actions());
		// state6 = state5.result(state5.actions().get(0));
		// state6.printState();
		// System.out.println(state6.actions());
		// state7 = state6.result(state6.actions().get(0));
		// state7.printState();
		// System.out.println(state7.actions());
		// state8 = state7.result(state7.actions().get(0));
		// state8.printState();
		// System.out.println(state8.actions());
		// state9 = state8.result(state8.actions().get(0));
		// state9.printState();
		// System.out.println(state9.actions());
		// state10 = state9.result(state9.actions().get(0));
		// state10.printState();
		CheckersState state1 = new CheckersState(3);
		state1.printState();
		for (int i = 0; i < 5; i++)
		{
			ArrayList<Move> moves = (ArrayList<Move>)state1.actions();
			System.out.println(moves);
			System.out.println("Take " + moves.get(0));
			state1 = state1.result(moves.get(0));
			state1.printState();
		}
		
		Move best = state1.bestMove();
		System.out.println(best);
		state1.result(best).printState();
	}
	
	
}
